<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>결재암호</title>
<script type='text/javascript'>
	var userId = '${USERID}';

	$(document).ready(function() {
		$('#IDC_PASSWORD_CONTROL').focus();
		$('#IDC_PASSWORD_CONTROL').capsChecker({ capson: onCaps, capsoff: onCaps });
	});
	
	function onCaps(e, on)
	{
		if(on) {
			$('#pnlIndicator').addClass('on')
		} else {
			$('#pnlIndicator').removeClass('on')
		}
	}
	
	function fncVerify() {
		var cmt = $('#IDC_PASSWORD_CONTROL').val().strip();
		
		if (cmt == '') {
			alert("<spring:message code='W1490' />");
			$('#IDC_PASSWORD_CONTROL').focus();
			return false;
		}

		var obj=Capi.checkValidUser(userId, cmt);

	    if(obj.isValid) {
	    	window.returnValue={text: cmt };
	    } else {
	        alert(lang_dlgCall_invalidPasswd);
	        window.returnValue = false;
	    }
	    window.close();
	    return false;		
	}
	function fncClose() {
		window.returnValue = false;
		window.close();
	}
	
	function ckeckKey(){
		if(event.keyCode==13){
			return fncVerify();
		}
	}
</script>
<style>
.indicator{	text-align: center;	color: red;	display: none;}
.indicator.on { display: block }
</style>
</head>
<body>
	
	<div id="pop_wrap" style="min-width:250px;">
		<h1>
	    	<p>결재암호</p>
		</h1>
		<!--pop_container Start-->
		<div id="pop_container">
		    <div id='contents'>
				<form name="aform" method='post' enctype="multipart/form-data" onsubmit="return fncVerify();">
					<div>
						<table class="basic_table" width="100%" summary="">
							<caption> </caption>
							<tbody>
								<tr>
									<th width="30%">결재암호</th>
									<td>
										<input type="password" name="password" id="IDC_PASSWORD_CONTROL" style="width:98%" onkeydown="return ckeckKey();"/>
									</td>
								</tr>	
							</tbody>
						</table>
					</div>
				</form>
			</div>
		
		</div>
		<div id="pnlIndicator" class="indicator">※Caps Lock키가 켜져있습니다.</div>			
		<!--//pop_container End-->
		<!-- footcen Start -->
		<div class="footcen">
			<ul class="btns">
				<li><span><a href="#a" onclick="javaScript:fncVerify();">확인</a></span></li>
				<li><span><a href="#a" onclick="javascript:self.close();">취소</a></span></li>
			</ul>
		</div>
		<!--//footcen End-->
	</div>
</body>
</html>